@extends('admin.base.parent')
@section('content')
<div class="main-content">
	<div class="breadcrumbs" id="breadcrumbs">
		<script type="text/javascript">
			try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
		</script>

		<ul class="breadcrumb">
			<li>
				<i class="icon-home home-icon"></i>
				<a href="#">主页</a>
			</li>

			<li>
				<a href="#">用户列表</a>
			</li>
			<li class="active">用户操作页</li>
		</ul><!-- .breadcrumb -->

		<div class="nav-search" id="nav-search">
			<form class="form-search" action="{{ url('admin/users/details') }}" method='get'>
				<span class="input-icon">
					<input type="text" placeholder="查找" class="nav-search-input" id="nav-search-input" autocomplete="off" name='username'/>
					<i class="icon-search nav-search-icon"></i>
					<button type="submit" class="btn btn-purple btn-sm">
						搜索
					<i class="icon-search icon-on-right bigger-110"></i>
					</button>
				</span>
			</form>
		</div><!-- #nav-search -->
	</div>

	<div class="page-content">
		<div class="page-header">
			<h1>
				用户列表
				<small>
					<i class="icon-double-angle-right"></i>
					用户操作页
				</small>
			</h1>
		</div><!-- /.page-header -->

		@if(session('msg'))
			<h3>{{ session('msg') }}</h3>
		@endif

		<div class="row">
			<div class="col-xs-12">
				<!-- PAGE CONTENT BEGINS -->
				<div class="row">
					<div class="col-xs-12">
						<div class="table-responsive">
							<table id="sample-table-1" class="table table-striped table-bordered table-hover">
								<thead>
									<tr>
										<th class="center">
											<label>
												<input type="checkbox" class="ace" />
												<span class="lbl"></span>
											</label>
										</th>
										<th>用户ID</th>
										<th>用户名称</th>
										<th>用户简介</th>
										<th>用户性别</th>
										<th>注册时间</th>
										<th>
											<!-- <i class="icon-time bigger-110 hidden-480"></i> -->
											用户头像
										</th>
										<th class="hidden-480">Email</th>
										<th>操作</th>
									</tr>
								</thead>
								<form name="myform" method="post">
									{{ csrf_field() }}
									{{ method_field('DELETE') }}
								</form>
								<tbody>
									@foreach($list as $v)
									<tr>
										<td class="center">
											<label>
												<input type="checkbox" class="ace" />
												<span class="lbl"></span>
											</label>
										</td>

										<td>
											<a href="#">{{ $v->id }}</a>
										</td>
										<td>{{ $v->username }}</td>
										<td>{{ $v->info }}</td>
										<td>@if($v->sex == 1) 男 @else 女 @endif</td>
										<td>{{ date('Y-m-d H:i:s',$v->regtime) }}</td>
										<td><img src="{{ asset('admin/upload').'/'.$v->upic }}" width="100" height="100"></td>
										<td>{{ $v->email }}</td>
										<td>
											<div class="visible-md visible-lg hidden-sm hidden-xs btn-group">																
												<a href="{{ url('admin/users/details/'.$v->id.'/edit') }}" class="btn btn-xs btn-info">
													<i class="icon-edit bigger-120">编辑</i>
												</a>
												
												<a href="javascript:doDel({{ $v->id }})" class="btn btn-xs btn-danger">
													<i class="icon-trash bigger-120">删除</i>
												</a>
											</div>

											<div class="visible-xs visible-sm hidden-md hidden-lg">
												<div class="inline position-relative">
													<button class="btn btn-minier btn-primary dropdown-toggle" data-toggle="dropdown">
														<i class="icon-cog icon-only bigger-110"></i>
													</button>

													<ul class="dropdown-menu dropdown-only-icon dropdown-yellow pull-right dropdown-caret dropdown-close">
														<li>
															<a href="#" class="tooltip-info" data-rel="tooltip" title="View">
																<span class="blue">
																	<i class="icon-zoom-in bigger-120"></i>
																</span>
															</a>
														</li>

														<li>
															<a href="#" class="tooltip-success" data-rel="tooltip" title="Edit">
																<span class="green">
																	<i class="icon-edit bigger-120"></i>
																</span>
															</a>
														</li>

														<li>
															<a href="#" class="tooltip-error" data-rel="tooltip" title="Delete">
																<span class="red">
																	<i class="icon-trash bigger-120"></i>
																</span>
															</a>
														</li>
													</ul>
												</div>
											</div>
										</td>
									</tr>
									@endforeach
								</tbody>
							</table>
						</div><!-- /.table-responsive -->
					</div><!-- /span -->
				</div><!-- /row -->
				<script type="text/javascript">
					function doDel(id)	{
						if(confirm('确定删除吗?')){
							var form = document.myform;
							form.action = 'details/'+id;
							form.submit();
						}
					}
				</script>
				<div class="hr hr-18 dotted hr-double"></div>
				{{ $list->appends($where)->links() }}
				</div>

				<div id="modal-table" class="modal fade" tabindex="-1">
					<div class="modal-dialog">
						<div class="modal-content">
							<div class="modal-header no-padding">
								<div class="table-header">
									<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
										<span class="white">&times;</span>
									</button>
									Results for "Latest Registered Domains
								</div>
							</div>

							<div class="modal-body no-padding">
								<table class="table table-striped table-bordered table-hover no-margin-bottom no-border-top">
									<thead>
										<tr>
											<th>Domain</th>
											<th>Price</th>
											<th>Clicks</th>

											<th>
												<i class="icon-time bigger-110"></i>
												Update
											</th>
										</tr>
									</thead>

									<tbody>
										<tr>
											<td>
												<a href="#">ace.com</a>
											</td>
											<td>$45</td>
											<td>3,330</td>
											<td>Feb 12</td>
										</tr>

										<tr>
											<td>
												<a href="#">base.com</a>
											</td>
											<td>$35</td>
											<td>2,595</td>
											<td>Feb 18</td>
										</tr>

										<tr>
											<td>
												<a href="#">max.com</a>
											</td>
											<td>$60</td>
											<td>4,400</td>
											<td>Mar 11</td>
										</tr>

										<tr>
											<td>
												<a href="#">best.com</a>
											</td>
											<td>$75</td>
											<td>6,500</td>
											<td>Apr 03</td>
										</tr>

										<tr>
											<td>
												<a href="#">pro.com</a>
											</td>
											<td>$55</td>
											<td>4,250</td>
											<td>Jan 21</td>
										</tr>
									</tbody>
								</table>
							</div>

							<div class="modal-footer no-margin-top">
								<button class="btn btn-sm btn-danger pull-left" data-dismiss="modal">
									<i class="icon-remove"></i>
									Close
								</button>

								<ul class="pagination pull-right no-margin">
									<li class="prev disabled">
										<a href="#">
											<i class="icon-double-angle-left"></i>
										</a>
									</li>

									<li class="active">
										<a href="#">1</a>
									</li>

									<li>
										<a href="#">2</a>
									</li>

									<li>
										<a href="#">3</a>
									</li>

									<li class="next">
										<a href="#">
											<i class="icon-double-angle-right"></i>
										</a>
									</li>
								</ul>
							</div>
						</div><!-- /.modal-content -->
					</div><!-- /.modal-dialog -->
				</div><!-- PAGE CONTENT ENDS -->
			</div><!-- /.col -->
		</div><!-- /.row -->
	</div><!-- /.page-content -->
</div><!-- /.main-content -->
@endsection